package com.zr.model;
// Generated 2017-7-6 10:10:11 by Hibernate Tools 4.0.0.Final

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Ccarinfo generated by hbm2java
 */
@Entity
@Table(name = "ccarinfo", catalog = "cqlwlps")
public class Ccarinfo implements java.io.Serializable {

	private Integer cid;
	private Ccstate ccstate;
	private String ctype;
	private String cnumber;
	private double maxweight;
	private double maxlong;
	private double maxwidth;
	private double maxheight;
	private String cstation;
	private Set<Ccarreport> ccarreports = new HashSet<Ccarreport>(0);

	public Ccarinfo() {
	}

	public Ccarinfo(Ccstate ccstate, String ctype, String cnumber, double maxweight, double maxlong, double maxwidth,
			double maxheight, String cstation) {
		this.ccstate = ccstate;
		this.ctype = ctype;
		this.cnumber = cnumber;
		this.maxweight = maxweight;
		this.maxlong = maxlong;
		this.maxwidth = maxwidth;
		this.maxheight = maxheight;
		this.cstation = cstation;
	}

	public Ccarinfo(Ccstate ccstate, String ctype, String cnumber, double maxweight, double maxlong, double maxwidth,
			double maxheight, String cstation, Set<Ccarreport> ccarreports) {
		this.ccstate = ccstate;
		this.ctype = ctype;
		this.cnumber = cnumber;
		this.maxweight = maxweight;
		this.maxlong = maxlong;
		this.maxwidth = maxwidth;
		this.maxheight = maxheight;
		this.cstation = cstation;
		this.ccarreports = ccarreports;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "cid", unique = true, nullable = false)
	public Integer getCid() {
		return this.cid;
	}

	public void setCid(Integer cid) {
		this.cid = cid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "cstateid", nullable = false)
	public Ccstate getCcstate() {
		return this.ccstate;
	}

	public void setCcstate(Ccstate ccstate) {
		this.ccstate = ccstate;
	}

	@Column(name = "ctype", nullable = false)
	public String getCtype() {
		return this.ctype;
	}

	public void setCtype(String ctype) {
		this.ctype = ctype;
	}

	@Column(name = "cnumber", nullable = false)
	public String getCnumber() {
		return this.cnumber;
	}

	public void setCnumber(String cnumber) {
		this.cnumber = cnumber;
	}

	@Column(name = "maxweight", nullable = false, precision = 22, scale = 0)
	public double getMaxweight() {
		return this.maxweight;
	}

	public void setMaxweight(double maxweight) {
		this.maxweight = maxweight;
	}

	@Column(name = "maxlong", nullable = false, precision = 22, scale = 0)
	public double getMaxlong() {
		return this.maxlong;
	}

	public void setMaxlong(double maxlong) {
		this.maxlong = maxlong;
	}

	@Column(name = "maxwidth", nullable = false, precision = 22, scale = 0)
	public double getMaxwidth() {
		return this.maxwidth;
	}

	public void setMaxwidth(double maxwidth) {
		this.maxwidth = maxwidth;
	}

	@Column(name = "maxheight", nullable = false, precision = 22, scale = 0)
	public double getMaxheight() {
		return this.maxheight;
	}

	public void setMaxheight(double maxheight) {
		this.maxheight = maxheight;
	}

	@Column(name = "cstation", nullable = false)
	public String getCstation() {
		return this.cstation;
	}

	public void setCstation(String cstation) {
		this.cstation = cstation;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "ccarinfo")
	public Set<Ccarreport> getCcarreports() {
		return this.ccarreports;
	}

	public void setCcarreports(Set<Ccarreport> ccarreports) {
		this.ccarreports = ccarreports;
	}

}
